<?php 
/*学生信息案例
header("Content-type: text/html; charset=utf-8");
$wyy=array('stuno'=>'14110100436','name'=>'魏莹悦','sex'=>'女','birth'=>'1996-06-16','class'=>'14004');
$wyy['major']='计算机科学与技术';
var_dump($wyy);
$wyy2=array('stuno'=>'14110100435','name'=>'赵月','sex'=>'女','birth'=>'1995-08-16','class'=>'14004');
$wyy2['major']='计算机科学与技术';
var_dump($wyy2);
$wyy3=array('stuno'=>'14110100433','name'=>'娄云月','sex'=>'女','birth'=>'1996-05-16','class'=>'14004');
$wyy3['major']='计算机科学与技术';
var_dump($wyy3);
//$stus=array($wyy,$wyy2,$wyy3);//方法一
$stus=array($wyy,$wyy2);
$stus[]='$wyy3';
var_dump($stus);
*/
/*用户案例
header("Content-type: text/html; charset=utf-8");
$user1=array('username'=>'14110100436',
	         'password'=>'weiyingyue501',
	         'realname'=>'魏莹悦',
	         'sex'=>'女',
	         'hobby'=>'游泳,篮球,唱歌,跑步',
	         'thumb'=>'thumb/wyy.jpg',
	         'email'=>'1162200314@qq.com'
	         ); 
var_dump($user1);
$user2=array('username'=>'14110100436',
	         'password'=>'weiyingyue501',
	         'realname'=>'赵月',
	         'sex'=>'女',
	         'hobby'=>'游泳,篮球,唱歌,跑步',
	         'thumb'=>'thumb/wyy.jpg',
	         'email'=>'1162200314@qq.com'
	         ); 
var_dump($user2);
$user3=array('username'=>'14110100436',
	         'password'=>'weiyingyue501',
	         'realname'=>'娄云月',
	         'sex'=>'女',
	         'hobby'=>'游泳,篮球,唱歌,跑步',
	         'thumb'=>'thumb/wyy.jpg',
	         'email'=>'1162200314@qq.com'
	         ); 
var_dump($user3);
$users=array();
$users[]=$user1;
$users[]=$user2;
$users[]=$user3;
var_dump($users);
foreach($users as $one)
{
	/*foreach($one as $key=>$value)
	{
		echo $key.'value'.'<br>';
	}
    echo '用户名:'.$one['username'].'<br>';
	echo '姓名:'.$one['realname'].'<br>';
	echo '邮箱:'.$one['email'].'<br>';
}*/
//视频案例
header("Content-type: text/html; charset=utf-8");
$category_movie=array(
	'id'=>1,
	'category_movie'=>'电影'
	);
var_dump($category_movie);
$category_dsj=array(
	'id'=>2,
	'category_dsj'=>'电视剧'
	);
var_dump($category_dsj);
$category_zy=array(
	'id'=>1,
	'category_zy'=>'综艺'
	);
var_dump($category_zy);

$category=array($category_movie,$category_dsj,$category_zy);
$video1=array(
	'id'=>1,
	'name'=>'美人鱼',
	'intro'=>'还可以',
	'director'=>'周星驰',
	'thumb'=>'fish.jpg',
	'category_id'=>1,
	'category_name'=>'电影'
	);
$video2=array(
	'id'=>2,
	'name'=>'疯狂动物城 ',
	'intro'=>'还可以',
	'director'=>'海外导演',
	'thumb'=>'animal.jpg',
	'category_id'=>1,
	'category_name'=>'电影'
	);
$video3=array(
	'id'=>3,
	'name'=>'原来是美男',
	'intro'=>'还可以',
	'director'=>'韩国导演',
	'thumb'=>'fish.jpg',
	'category_id'=>2,
	'category_name'=>'电视剧'
	);
$video4=array(
	'id'=>4,
	'name'=>'芈月传',
	'intro'=>'还可以',
	'director'=>'宋小龙',
	'thumb'=>'fish.jpg',
	'category_id'=>2,
	'category_name'=>'电视剧'
	);
$video5=array(
	'id'=>5,
	'name'=>'跑男',
	'intro'=>'还可以',
	'director'=>'江苏卫视',
	'thumb'=>'fish.jpg',
	'category_id'=>3,
	'category_name'=>'综艺'
	);
$video6=array(
	'id'=>6,
	'name'=>'快乐大本营',
	'intro'=>'还可以',
	'director'=>'湖南卫视',
	'thumb'=>'fish.jpg',
	'category_id'=>3,
	'category_name'=>'综艺'
	);
$video=array($video1,$video2,$video3,$video4,$video5,$video6);
$videos=array();
$movies=array(
	'category_id'=>1,
	'category_name'=>'电影',
	'videos'=>array($video1,$video2,$video3,$video4,$video5,$video6)
	);
$videos[]=$movies;
var_dump($movies);
 ?>

